﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileContactInfosAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileContactInfos" %>
<owc:OwGrid ID="OpenHomeProfileContactInfoGrid" runat="server" SkinID="OwGridAdmin"
    DataSourceID="OpenHomeProfileContactInfosOds">
    <MasterTableView DataSourceID="OpenHomeProfileContactInfosOds" DataKeyNames="OpenHomeProfileContactInfoID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileContactInfoID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:MapImage %>'>
                <ItemTemplate>
                    <div align="center">
                        <img src='<%# Eval("MapImage")%>' width="150" height="150" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="HomeProfileDetails" />
                            </td>
                            <td>
                                <b><i>
                                    <%#OwOpenHomeProfileDetailsBLL.OwGetEntity((long?)Eval("OpenHomeProfileDetailID")).FullName%></i>
                                </b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="LanguageCode" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Email" />
                            </td>
                            <td>
                                <%# Eval("Email") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="PhoneNumber" />
                            </td>
                            <td>
                                <%# Eval("PhoneNumber") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="MobilePhoneNumber" />
                            </td>
                            <td>
                                <%# Eval("MobilePhoneNumber") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Address" />
                            </td>
                            <td>
                                <%# Eval("Address") %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Continent" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ContinentID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="CountryLabel" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("CountryID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Province" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ProvinceID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="District" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("DistrictID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Ward" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("WardID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="ZIPCode" />
                            </td>
                            <td>
                                <%# Eval("ZIPCode")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Latitude" />
                            </td>
                            <td>
                                <%# Eval("Latitude")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Longitude" />
                            </td>
                            <td>
                                <%# Eval("Longitude")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsDefault" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDefaultCb" runat="server" Checked='<%#Eval("IsDefault")%>'
                                    AutoPostBack="true" Text='<%#Eval("OpenHomeProfileContactInfoID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsDefaultCb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsDeleted" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%#Eval("IsDeleted")%>'
                                    AutoPostBack="true" Text='<%#Eval("OpenHomeProfileContactInfoID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsDeletedCb_CheckedChanged" />
                            </td>
                        </tr>
                        <%-- <tr>
                            <td colspan="2">
                                <owc:OwR runat="server" OwText="AdditionalInformation" />
                                :
                                <%# Eval("AdditionalInformation")%>
                            </td>
                        </tr>--%>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:Modify %>">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfileContactInfosEdit.aspx?Id=<%#Eval("OpenHomeProfileContactInfoID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("HomeProfileContactInfosEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="OpenHomeProfileContactInfosOds" runat="server" EnablePaging="True"
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileContactInfosBLL"
    SelectCountMethod="OwGetByDynamicCount" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileContactInfosEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="openHomeProfileContactInfoID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="isDefault" Type="Boolean" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
